﻿using Caliburn.Micro;
using myapp.Events;
using myapp.Events.ViewModel;
using myapp.Instances;
using myapp.ViewModels;
using myappcore.ViewModels;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace myapp.ViewModels
{
    public class FunctionGroupViewModel : IBaseContentViewModel
    {
        #region Attribute

        #endregion

        #region Properties
        /// <summary>
        /// Current group of function
        /// </summary>
        public FunctionGroup FunctionGroup { get; set; }

        /// <summary>
        /// Function List of Group
        /// </summary>
        public IObservableCollection<FunctionViewModel> FunctionViewModelList { get; set; }

        #endregion

        #region Constructor

        public FunctionGroupViewModel()
        {
            CurrentColor = MainInstance.Instance.ColorConfig.FunctionGroupNormal;
        }
        #endregion

        #region Method

        /// <summary>
        /// Selected group of function
        /// </summary>
        public void FunctionGroupViewModelSelected()
        {
            MainInstance.Instance.EventAggregator.Publish(new ViewModelFunctionGroupSelectedEvent()
            {
                FunctionGroupViewModel = this
            });
        }
        #endregion
    }
}
